home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / hdf / unix / examples.lha / examples / ris8 / threeRISF.f < prev   
Encoding:
Text File  |  1991-01-09  |  1.7 KB  |  59 lines

  1.       program threeRIS
  2. C
  3. C Illustrates reading three RISs from three files and outputting them
  4. C to one filei.  A palette is also read from a file and associated 
  5. C with all of the images..
  6. C
  7. C Input files:  storm110.hdf,storm120.hdf, storm130.hdf (in "files" directory)
  8. C               grey.pal (HDF file containing a palette)
  9. C Output file: 3storm.hdf
  10. C
  11.       character*1 image1(256,256), image2(256,256), image3(256,256)
  12.       character*1 pal(768)
  13.       integer xdim(3), ydim(3)
  14.       integer DFTAG_RLE
  15.       integer d8spal, dpgpal
  16.       integer d8pimg, d8aimg, d8gdims, d8gimg
  17.       integer ret, ispal
  18.  
  19.       DATA DFTAG_RLE/11/
  20.  
  21.       write(*,*) 'xdim, ydim, ispal, ret:'
  22.  
  23.       ret = d8gdims('storm110.hdf', xdim(1), ydim(1), ispal)
  24.       write(*,*) xdim(1), ydim(1), ispal, ret
  25.       ret = d8gimg('storm110.hdf', image1, xdim(1), ydim(1), pal)
  26.  
  27.       ret = d8gdims('storm120.hdf', xdim(2), ydim(2), ispal)
  28.       write(*,*) xdim(2), ydim(2), ispal, ret
  29.       ret = d8gimg('storm120.hdf', image2, xdim(2), ydim(2), pal)
  30.  
  31.       ret = d8gdims('storm130.hdf', xdim(3), ydim(3), ispal)
  32.       write(*,*) xdim(3), ydim(3), ispal, ret
  33.       ret = d8gimg('storm130.hdf', image3, xdim(3), ydim(3), pal)
  34.  
  35.       ret = dpgpal('grey.pal', pal)
  36.  
  37.  
  38. C     :
  39. C     :
  40.  
  41.       write(*,*) 'Now writing out first image.  No compression.'
  42.       ret = d8spal(pal)
  43.       ret = d8pimg('3storm.hdf', image1, xdim(1), ydim(1), 0)
  44.  
  45.       write(*,*) '   Second image. RLE compression.'
  46.       ret = d8aimg('3storm.hdf', image2,
  47.      &                    xdim(2), ydim(2), DFTAG_RLE)
  48.       write(*,*) '      Third image.  No compression.'
  49.       ret = d8aimg('3storm.hdf', image3, xdim(3), ydim(3), 0)
  50.  
  51. C     :
  52.  
  53.       stop
  54.       end
  55.  
  56.  
  57.  
  58.  
  59.